package com.lagou.lagoustreamproducer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Authther: mrwu
 * @date:2021/4/16-04
 * @Description:com.lagou.lagoustreamconsumer.controller
 */
@RestController
public class ProducerController {
    @Autowired
    private StreamBridge streamBridge;
    @GetMapping("/message")
    public void sendMissage(String message){
        streamBridge.send("test-out-0", message);
    }
}
